<?php

/**
 * @package		Joomla
 * @subpackage	wbfirst
 * @copyright	2008 Wim Bekker, www.wimbekker.com.
 * @license		GNU/GPL
*/
 
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.view');

//classname'View'viewname 
class WbfirstsViewWbfirst extends JView
{
  function display($tpl = null)
  {
    //get the wbfirst
    $wbfirst      =& $this->get('Data');
    $isNew        = ($wbfirst->id < 1);
    
    $text = $isNew ? JText::_( 'New' ) : JText::_( 'Edit' );
    JToolBarHelper::title(   JText::_( 'WBFIRST_MANAGER' ).': <small><small>[ ' . $text.' ]</small></small>' );
    JToolBarHelper::save();
    if ($isNew)  
    {
      JToolBarHelper::cancel();
    } 
    else 
    {
      // for existing items the button is renamed `close`
      JToolBarHelper::cancel( 'cancel', 'Close' );
    }
    
    $this->assignRef('wbfirst', $wbfirst);
    parent::display($tpl);
  }
}

?>
